<?php 
$GLOBALS['Md'] = "MF93FL27";
$GLOBALS['Pd'] = "B";
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($_SERVER['DOCUMENT_ROOT']."/Modules/MF93FL27/modconf.mex");
MYTCONN(); 
form_pr('bss_filters','','','post');
	if (!isset($_POST['bss_Office'])) {$_POST['bss_Office'] = ''; }
	if (!isset($_POST['bss_Product'])) {$_POST['bss_Product'] = ''; }

	echo '<div class="title" id ="bss_menu">';
	
	$qr_office = 'SELECT OriNumero AS ID, OriNombre AS NAME FROM Origenes WHERE OriTipo = 2 AND OriNumero > 800';
	$qr_product =  'SELECT REF AS ID, NAME FROM bonusproducts';
	
	$qr_o = '';
	$qr_p = '';
	echo 'Lojas: ';
	mn_field('select','ED','bss_Office',$_POST['bss_Office'],$qr_office,' ','','');
	echo 'Produto: ';
	mn_field('select','ED','bss_Product',$_POST['bss_Product'],$qr_product,' ','','');

	mn_field('button','ED','bss_Submit','Consultar','','','','" onClick="
		document.bss_filters.action=\''.$MODURL.'lib/rs_vwstkregentries.php\';
		subform(\'bss_filters\',\'bss_stockresults\');');
	echo '</div></form>';
?>
<div id="bss_stockresults"></div>